{% load forum_tags %}

{% with params=request.GET.urlencode %}

    <div class="ui first segment">
        <div class="ui small compact menu no-shadow">
            <div class="ui simple dropdown item">
                <i class="{% get_icon string=limit default='all' %}"></i>
                <span class="tablet">{% get_wording prefix="Limit :" filtered=limit default="all" %}</span>
                <i class="dropdown icon"></i>

                <div class="menu">
                    <a class="item" href="{% relative_url 'all' 'limit' params %}">
                        <i class="{% get_icon 'all' %}"></i>all time
                    </a>
                    <a class="item" href="{% relative_url 'today' 'limit' params %}">
                        <i class="{% get_icon 'today' %}"></i>today
                    </a>
                    <a class="item" href="{% relative_url 'week' 'limit' params %}">
                        <i class="{% get_icon 'week' %}"></i>this week
                    </a>
                    <a class="item" href="{% relative_url 'month' 'limit' params %}">
                        <i class="{% get_icon 'month' %}"></i>this month
                    </a>
                    <a class="item" href="{% relative_url 'year' 'limit' params %}">
                        <i class="{% get_icon 'year' %}"></i>this year
                    </a>

                </div>
            </div>
        </div>
    </div>


        <div class="ui page-bar segment">
            {% pages objs=posts %}
        </div>


    <div class="ui third segment">
        <div class="ui small compact menu no-shadow float-right">
            <div
                    class="ui simple dropdown item">

                <i class="{% get_icon string=order default='rank' %}"></i>
                <span class="tablet">{% get_wording prefix="Sort:" filtered=order default="rank" %}</span>
                <i class="dropdown icon"></i>

                <div class="menu">

                    <a class="item" href="{% relative_url 'rank' 'order' params %}">
                        <i class="{% get_icon 'rank' %}"></i>Rank
                    </a>

                    <a class="item" href="{% relative_url 'views' 'order' params %}">
                        <i class="{% get_icon 'views' %}"></i>Views
                    </a>

                    <a class="item" href="{% relative_url 'votes' 'order' params %}">
                        <i class="{% get_icon 'votes' %}"></i>Votes
                    </a>
                    <a class="item" href="{% relative_url 'replies' 'order' params %}">
                        <i class="{% get_icon 'replies' %}"></i>Replies
                    </a>

                </div>
            </div>
        </div>
    </div>

{% endwith %}
